package com.egao.common.module.cms.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 信息管理
 * @author pyx
 */
@ApiModel(description = "信息管理")
@TableName("cms_official")
@Data
public class Official {
    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("爬虫管理id")
    private Integer crawlerId;

    @ApiModelProperty("爬虫管理类型名称")
    @TableField(exist = false)
    private String crawlerName;

    @ApiModelProperty("标题")
    private String title;

    @ApiModelProperty("来源")
    private String source;

    @ApiModelProperty("信息时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date officialTime;

    @ApiModelProperty("内容")
    private String content;

    @ApiModelProperty("信息地址")
    private String url;

    @ApiModelProperty("点击量")
    private Integer hits;

    @ApiModelProperty("添加时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date createTime;

    @ApiModelProperty("编辑时间")
    private Date updateTime;

    @ApiModelProperty("是否删除 0否 1是")
    @TableLogic
    private Integer deleted;
}
